<%--
  Created by IntelliJ IDEA.
  User: Admin
  Date: 2020/9/28
  Time: 0:53
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

<!--导航-->
<div class="container-fluid">
    <div class="row">
        <nav class="navbar navbar-inverse navbar-static-top" role="navigation">
            <div class="container-fluid">
                <div class="navbar-header">
                    <button type="button" class="navbar-toggle" data-toggle="collapse"
                            data-target="#example-navbar-collapse">
                        <span class="sr-only">切换导航</span>
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                    </button>
                    <img class="h" src="http://${path2}/img/logo.png" alt="加载失败">
                </div>
                <div class="collapse navbar-collapse" id="example-navbar-collapse">
                    <!--向左对齐-->
                    <ul class="nav navbar-nav navbar-left">
                        <li><a href="${path}/home/page">首页</a></li>
                        <li><a href="${path}/home/togetherRent">合租</a></li>
                        <li><a href="${path}/home/WholeRent">整租</a></li>


                        <%--                        <li class="dropdown">--%>
                        <%--                            <a href="#" class="dropdown-toggle" data-toggle="dropdown">--%>
                        <%--                                推荐版块--%>
                        <%--                                <b class="caret"></b>--%>
                        <%--                            </a>--%>
                        <%--                            <ul class="dropdown-menu">--%>
                        <%--                                <li><a href="${path}/home/student">学生版</a></li>--%>
                        <%--                                <li><a href="${path}/home/white">白领版</a></li>--%>
                        <%--                            </ul>--%>
                        <%--                        </li>--%>


                        <c:if test="${register.identity=='3'}">
                            <li><a href="${path}/agent/select">发布房源</a></li>
                        </c:if>
                        <%--                        <c:if test="${register.identity=='3'}">--%>
                        <%--                            <li><a href="${path}/agent/select">发布房源</a></li>--%>
                        <%--                        </c:if>--%>
                        <%--                        <c:if test="${register.identity=='3'}">--%>
                        <%--                            <li><a href="${path}/agent/select">发布房源</a></li>--%>
                        <%--                        </c:if>--%>
                    </ul>

                    <%--                    <form class="navbar-form navbar-left" role="search">--%>
                    <%--                        <div class="form-group">--%>
                    <%--                            <input type="text" class="form-control" placeholder="搜索房源">--%>
                    <%--                        </div>--%>
                    <%--                        <button type="submit" class="btn btn-default">搜索</button>--%>
                    <%--                    </form>--%>

                    <!--向右对齐-->
                    <ul class="nav navbar-nav navbar-right">
                        <li>
                            <c:if test="${sessionScope.register.id!=null}">
                                <a href="${path}/home/exit" data-toggle="modal_zhuce" data-target="#myModal_zhuce">安全退出</a>
                            </c:if>
                            <c:if test="${sessionScope.register.id==null}">
                                <a href="${path}/login/check" data-toggle="modal_zhuce" data-target="#myModal_zhuce">登  录</a>
                            </c:if>
                        </li>
                        <li>
                            <c:if test="${sessionScope.register.id!=null}">
                                <a href="${path}/<c:if test="${sessionScope.register.identity=='1'}">Tenant/info/${sessionScope.tenant.id}</c:if><c:if test="${sessionScope.register.identity=='3'}">Landlord/info/${sessionScope.landlord.id}</c:if><c:if test="${sessionScope.register.identity=='2'}">Agent/info/${sessionScope.agent.id}</c:if>
                                                    " class="dropdown-toggle" data-toggle="dropdown_zhongxin">你好 ${sessionScope.register.account}</a></li>
                            </c:if>
                            <c:if test="${sessionScope.register.id==null}">
                                <a href="${path}/register/check" data-toggle="modal_zhuce" data-target="#myModal_zhuce">注  册</a>
                            </c:if>
                        <li>
                            <c:if test="${sessionScope.register.id==null}">
                                <img class="head" src="http://${path2}/img/h2.png" alt="加载失败">
                            </c:if>
                            <c:if test="${sessionScope.register.id!=null}">
                                <img class="head" src="http://${path2}/img/<c:if test="${sessionScope.register.identity=='2'}">${agent.photograph}</c:if><c:if test="${sessionScope.register.identity=='1'}">${tenant.photograph}</c:if><c:if test="${sessionScope.register.identity=='3'}">${landlord.photograph}</c:if>" alt="加载失败">
                            </c:if>
                        </li>
                    </ul>
                </div>
            </div>
        </nav>
    </div>
</div>